﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySoftWare.MVCCommon.Repository;
using MySoftWare.BaseModel;
using MySoftWare.DataCommon;

namespace MySoftWare.MVCCommon.Services
{
    /// <summary>
    /// added by lqm 2013.06.18
    /// </summary>
    public class UserServices:IUserRepository
    {
        /// <summary>
        /// 获取所有的用户组
        /// </summary>
        /// <returns></returns>
        public List<UserGroupModel> GetUserGroupList()
        {
            return UserAccessor.GetUserGroup();
        }

        /// <summary>
        /// 添加用户组信息
        /// </summary>
        /// <param name="UserGroup"></param>
        /// <returns></returns>
        public bool AddUserGroup(UserGroupModel UserGroup)
        {
            return UserAccessor.AddUserGroup(UserGroup);
        }

        /// <summary>
        /// 删除用户组信息
        /// </summary>
        /// <param name="DeleteUserGroupID"></param>
        /// <returns></returns>
        public bool DeleteUserGroup(string DeleteUserGroupID)
        {
            return UserAccessor.DeleteUserGroup(DeleteUserGroupID);
        }

        /// <summary>
        /// 获取用户组详细信息
        /// </summary>
        /// <param name="GroupID"></param>
        /// <returns></returns>
        public UserGroupModel GetUserGroupDetail(string GroupID)
        {
            return UserAccessor.GetUserGroupDetail(GroupID);
        }

        public bool UpdateUserGroup(UserGroupModel UserGroup)
        {
            return UserAccessor.UpdateUserGroup(UserGroup);
        }
    }
}
